#pragma once

#include "dbcDefine.h"

#include <vector>
using std::vector;
using std::iterator;

LIBDBC_BEGIN_NAMESPACE

template <typename KEY, typename VALUE>
class dictionary_element
{
public:
  KEY k;
  VALUE v;

public:
  dictionary_element(void) {}
  dictionary_element(KEY key, VALUE value) { k=key;v=value; }
  ~dictionary_element(void) {}
};

template <typename KEY, typename VALUE>
class dictionary
{
protected:
  vector< dictionary_element<KEY,VALUE> > _elements;

public:
  dictionary();
  ~dictionary();

  size_t size();
  bool has(KEY k);


  bool set(KEY k, VALUE v);
  VALUE getByIndex(int i);
  VALUE get(KEY k);
  bool remove(KEY k);
  bool clear();

/*
  bool updateKeyForValue(VALUE v, KEY newKey);
*/
};


#include "dictionary.tpp"

LIBDBC_END_NAMESPACE
